home *** CD-ROM | disk | FTP | other *** search
- Q32029 Incorrect Code Generated For Loop
- C Compiler
- 5.10
- MS-DOS
-
- Summary:
- The source code below generates incorrect code when compiled. The
- effect is to have the si register loaded with a value from bp-4. This
- space was allocated by the compiler, but never written to by the
- routine.
-
- More Information:
- The source code is as follows:
-
- int c_row;
- right_shft(inc)
- int inc;
- {
- extern int y_pos[],y_inc[];
- int i;
- {
- for(i=y_pos[c_row];i<(y_pos[c_row]+y_inc[c_row]);i+=inc)
- /* One portion of the code generated for this line is:
-
- mov si, WORD PTR [bp-4]
-
- but bp-4 has not been initialized and contains some random value
- */
-
- writedot();
-
- }
- }
-
- Keywords: buglist5.10 qfbv
- Updated 88/07/21 03:19
-